package top.sxlai.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import top.sxlai.entity.DTO.OpUserInfoDto;
import top.sxlai.entity.OpUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

/**
 * (OpUser)表数据库访问层
 *
 * @author makejava
 * @since 2024-04-06 16:01:21
 */
@Mapper
@Repository
@Component
public interface OpUserMapper extends BaseMapper<OpUser> {
    OpUser login(@Param("username") String username,@Param("password") String password);

    int updateAvatarUrl(@Param("headImageUrl") String headImageUrl, @Param("userId") String userId);

    int changeUserInfo(OpUserInfoDto opUserInfoDto);

    int changePassword(OpUserInfoDto opUserInfoDto);

    OpUser getUserInfo(String userId);

    OpUser getNicknameByUsername( String username);
}
